package com.common.api.enums;

import com.common.api.iface.CodeNameEnumFace;

import lombok.AllArgsConstructor;

/**
 * @author ficus
 * 用户状态
 */
@AllArgsConstructor
public enum EnableStateEnum implements CodeNameEnumFace {

	enable("1","已启用"),    // 1 表示true
	disable("0","已禁用"),   // 0 表示false
	;
	private String code;
	
	private String name;
	
	@Override
	public String getEunmCode() {
		return code;
	}

	@Override
	public String getEnumName() {
		return name;
	}

	public static String revert(String code) {
		if(enable.getEunmCode().equals(code)) {
			return disable.getEunmCode();
		}else {
			return enable.getEunmCode();
		}
	}
}
